package com.riddle.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.riddle.dao.BaseDao;
import com.riddle.dao.CommentDao;
import com.riddle.model.Comment;

@Service
@Scope("prototype")  
public class CommentService extends BaseService<Comment> {

	@Resource
	private CommentDao commentDao;
	
	@Override
	protected BaseDao getDao() {
		// TODO Auto-generated method stub
		return commentDao;
	}

	public List<Comment> getCommentOfArticle(Long id){
		return commentDao.getCommentOfArticle(id);
	}
	
	public List<Comment> getRecentComment(){
		return commentDao.getRecentComment();
	}
}
